extends InteractiveObject3D

class_name LightSwitch

@export var controlled_light_sources: Array[LightSource]
@export var isActive = false

func _ready() -> void:
	toggle_lights()

func interact(params: Dictionary = {}): 
	super.interact(params)
	isActive = !isActive
	toggle_lights()

func toggle_lights() -> void:
	for light in controlled_light_sources:
		if isActive:
			light.enable()
		else:
			light.disable()
